﻿<?xml version="1.0" encoding="utf-8"?>
<xsd:schema id="SharePointTopNavDSLSchema" targetNamespace="http://schemas.microsoft.com/dsltools/SharePointTopNavDSL" elementFormDefault="qualified" xmlns="http://schemas.microsoft.com/dsltools/SharePointTopNavDSL" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <!-- TopNav -->
  <xsd:element name="topNav" type="TopNav" />
  <xsd:complexType name="TopNav">
    <xsd:annotation>
      <xsd:documentation>The root in which all other elements are embedded. Appears as a diagram.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <!-- Relationship: TopNavHasLinks -->
      <xsd:element name="links" minOccurs="0" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>Instances of TopNavHasLinks</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
          <xsd:sequence>
            <xsd:choice minOccurs="0" maxOccurs="unbounded" >
              <xsd:element ref="topNavHasLinks">
                <xsd:annotation>
                  <xsd:documentation>[Relationship deriving from TopNavHasLinks needs to be serialized in full-form]</xsd:documentation>
                </xsd:annotation>
              </xsd:element>
              <xsd:element ref="link" >
                <xsd:annotation>
                  <xsd:documentation>[Target role-player]</xsd:documentation>
                </xsd:annotation>
              </xsd:element>
            </xsd:choice>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>
    <!-- Id -->
    <xsd:attribute name="Id" type="xsd:string">
      <xsd:annotation>
        <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <!-- dslVersion -->
    <xsd:attribute name="dslVersion" type="xsd:string">
      <xsd:annotation>
        <xsd:documentation>Version of the model serialized in this file.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <!-- Property: SiteUrl -->
    <xsd:attribute name="siteUrl" type="xsd:string" />
  </xsd:complexType>
  
  <!-- TopNav Moniker -->
  <xsd:element name="topNavMoniker" type="TopNavMoniker" />
  <xsd:complexType name="TopNavMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for TopNav instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="Id" type="xsd:string" >
      <xsd:annotation>
        <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  
  <!-- Link -->
  <xsd:element name="link" type="Link" />
  <xsd:complexType name="Link">
    <xsd:annotation>
      <xsd:documentation>Elements embedded in the model. Appear as boxes on the diagram.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <!-- Relationship: LinkReferencesItems -->
      <xsd:element name="items" minOccurs="0" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>Instances of LinkReferencesItems</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
          <xsd:sequence>
            <xsd:choice minOccurs="0" maxOccurs="unbounded" >
              <xsd:element ref="linkReferencesItems">
                <xsd:annotation>
                  <xsd:documentation>[Relationship deriving from LinkReferencesItems needs to be serialized in full-form]</xsd:documentation>
                </xsd:annotation>
              </xsd:element>
              <xsd:element ref="linkMoniker" >
                <xsd:annotation>
                  <xsd:documentation>[Target role-player]</xsd:documentation>
                </xsd:annotation>
              </xsd:element>
            </xsd:choice>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>
    <!-- Property: Name -->
    <xsd:attribute name="name" type="xsd:string" use="required" />
    <!-- Property: Url -->
    <xsd:attribute name="url" type="xsd:string" />
    <!-- Property: Target -->
    <xsd:attribute name="target" type="xsd:string" />
    <!-- Property: IsExternal -->
    <xsd:attribute name="isExternal" type="xsd:boolean" />
    <!-- Property: Title -->
    <xsd:attribute name="title" type="xsd:string" />
  </xsd:complexType>
  
  <!-- Link Moniker -->
  <xsd:element name="linkMoniker" type="LinkMoniker" />
  <xsd:complexType name="LinkMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Link instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="name" type="xsd:string" >
      <xsd:annotation>
        <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  
  <!-- TopNavHasLinks -->
  <xsd:element name="topNavHasLinks" abstract="true" type="TopNavHasLinks" />
  <xsd:complexType name="TopNavHasLinks" abstract="true" >
    <xsd:annotation>
      <xsd:documentation>Embedding relationship between the Model and Elements</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <!-- Target end Link -->
      <xsd:element ref="link" minOccurs="1" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>[Target role-player]</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  
  <!-- TopNavHasLinks Moniker -->
  <xsd:element name="topNavHasLinksMoniker" abstract="true" type="TopNavHasLinksMoniker" />
  <xsd:complexType name="TopNavHasLinksMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for TopNavHasLinks instance.</xsd:documentation>
    </xsd:annotation>
  </xsd:complexType>
  
  <!-- LinkReferencesItems -->
  <xsd:element name="linkReferencesItems" abstract="true" type="LinkReferencesItems" />
  <xsd:complexType name="LinkReferencesItems" abstract="true" >
    <xsd:annotation>
      <xsd:documentation>Reference relationship between Elements.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <!-- Target end Link -->
      <xsd:element ref="linkMoniker" minOccurs="1" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>[Target role-player]</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  
  <!-- LinkReferencesItems Moniker -->
  <xsd:element name="linkReferencesItemsMoniker" abstract="true" type="LinkReferencesItemsMoniker" />
  <xsd:complexType name="LinkReferencesItemsMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for LinkReferencesItems instance.</xsd:documentation>
    </xsd:annotation>
  </xsd:complexType>
  
</xsd:schema>

